<template>
    <div>
        <slot name="title"></slot>
        <h2>msg = {{ msg }}</h2>
        <button @click="sysHello">sysHello</button>
    </div>
</template>
<script>

import { inject } from "vue";
export default {
    name: 'tech-sub',
    props: ['msg'],
    emits: ['hello'],
    mounted() {
        console.log(this.msg)
    },
    methods: {

    },
    setup(props, ctx) {
        console.log(props, ctx)

        function sysHello() {
            ctx.emit("hello", 'world')
        }

        console.log(inject("getComponent"))

        return {
            sysHello
        }
    }
}
</script>
<style></style>
  